package com.wfcm.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wfcm.annotation.IgnoreToken;
import com.wfcm.entity.WfActivityEntity;
import com.wfcm.entity.WfActivityNewsEntity;
import com.wfcm.service.WfActivityNewsService;
import com.wfcm.service.WfActivityService;
import com.wfcm.utils.R;

@Controller
@RequestMapping("/activity")
@ResponseBody
public class ActivityController {

	private Logger log = LoggerFactory.getLogger(AdInfoController.class);
	 @Autowired
	 private WfActivityNewsService wfActivityNewsService;
	
	 /**
	 * 活动头条
	 */
	@RequestMapping("/newsList")
	@ResponseBody
	@IgnoreToken
	public R chapterList(HttpServletRequest req) {

		log.debug("courseId:"+"");
		
		Map<String,Object> map = new HashMap<String,Object>();
		List<WfActivityNewsEntity> newsList = wfActivityNewsService.queryList(map);
		return R.ok().put("newsList", newsList);
	}
	
	
	
}
